package com.yue.excel;

import org.apache.poi.ss.usermodel.Cell;

/**
 * 功能描述: TODO <br/>
 * 创建时间: 2016/9/7<br/>
 *
 * @author QiuYang
 */
public class Column {
    private String colName;
    private ColumnType type;

    public Column(String colName, ColumnType type) {
        this.colName = colName;
        this.type = type;
    }

    public String getColName() {
        return colName;
    }

    public void setColName(String colName) {
        this.colName = colName;
    }

    public ColumnType getType() {
        return type;
    }

    public void setType(ColumnType type) {
        this.type = type;
    }

    public static int getCellType(ColumnType type) {
        switch(type){
            case STRING:
                return Cell.CELL_TYPE_STRING;
            case INTEGER:
                return Cell.CELL_TYPE_STRING;
            case DOUBLE:
                return Cell.CELL_TYPE_NUMERIC;
            default:
                return Cell.CELL_TYPE_STRING;
        }
    }
}
